namespace Apps.Models
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Data.Entity.Spatial;

    [Table("PLAN_PURCHASE")]
    public partial class PLAN_PURCHASE
    {
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        public PLAN_PURCHASE()
        {
            PLAN_PURCHASE_DEMAND = new HashSet<PLAN_PURCHASE_DEMAND>();
            PLAN_PURCHASE_DETAIL = new HashSet<PLAN_PURCHASE_DETAIL>();
        }

        [Key]
        [StringLength(40)]
        public string PURCHASE_ID { get; set; }

        [StringLength(40)]
        public string PRODUCTION_ID { get; set; }

        [StringLength(40)]
        public string ODD_NUMBERS { get; set; }

        public Nullable<int> YEAR { get; set; }

        public Nullable<int> MONTH { get; set; }

        public Nullable<int> TYPE { get; set; }

        public decimal? POWERC_OUNT { get; set; }

        public decimal? HEAT_COUNT { get; set; }

        public decimal? NATURAL_COAL { get; set; }

        public decimal? CURRENT_STOCK { get; set; }

        public decimal? ESTIMATE_COAL { get; set; }

        public decimal? ESTIMATE_STOCK_BEGIN { get; set; }

        public decimal? ESTIMATE_STOCK_END { get; set; }

        public decimal? OTHER_NEEDS { get; set; }

        public decimal? PRODUCTTION_NEEDS { get; set; }

        public decimal? PLANNED_PURCHASE { get; set; }

        public decimal? TOTAL_COST { get; set; }

        [StringLength(200)]
        public string MARK { get; set; }

        [StringLength(40)]
        public string COMPILE_USER { get; set; }

        public DateTime? COMPILE_TIME { get; set; }

        [StringLength(40)]
        public string TEMPLATE_ID { get; set; }

        public Nullable<int> APPROVAL_STATUS { get; set; }

        public virtual PLAN_PRODUCTION PLAN_PRODUCTION { get; set; }

        public SysUser COMPILE_SYSUSER { get; set; }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<PLAN_PURCHASE_DEMAND> PLAN_PURCHASE_DEMAND { get; set; }

        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<PLAN_PURCHASE_DETAIL> PLAN_PURCHASE_DETAIL { get; set; }

        //public virtual WORKFLOW_TEMPLATE WORKFLOW_TEMPLATE { get; set; }
    }
}
